package com.example.zhongshuishi.mapper;


import com.example.zhongshuishi.entity.StudentDto;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface StudentMapper {

    // 新增学生
    int insert(StudentDto student);

    // 根据ID删除学生
 //   @Delete("DELETE FROM stu_infor WHERE id = #{id}")
    int deleteById(String id);

    int update(StudentDto student);

    int updateById(StudentDto studentDto);

    StudentDto selectById(String id);

    List<StudentDto> selectAll();

    List<StudentDto> selectInformation(@Param("name") String name, @Param("phone") String phone);
    StudentDto selectByOrderNo(@Param("orderNo") String orderNo);
    int updatePaymentStatusByOrderNo(@Param("orderNo") String orderNo, @Param("paymentStatus") String paymentStatus);

    int updatePaymentStatus(StudentDto student);
    int updatePaymentStatus(@Param("id") String id, @Param("paymentStatus") String paymentStatus);

    StudentDto selectByPhone(String phone);

    String isTeacherExist(@Param("teacherName") String teacherName); // 修改方法：返回教师ID

    List<StudentDto> selectByPersonnal(Integer teacherId,String teacher,Integer wxId,String stuName,String stuIdnumber,String stuPhone);

    int insertOrder(StudentDto student);
    int insertTraining(StudentDto student);

    int updateTraining(StudentDto student);

    String selectPaymentStatus(String id);
}
